package com.focus.xyz.core.utils;

import java.io.IOException;

/**
 * Created by chenmeng on 2016/4/21.
 */
public class Capture {
    public static int capture(String url,String fileName){
        String path = System.getProperty("user.dir") + "\\drivers\\IECapt.exe";
        Process pro = null;
        try {
            pro = Runtime.getRuntime().exec(path + " --url=" + url + " --out=" + fileName);
            try {
                pro.waitFor();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }catch(IOException e){
            e.printStackTrace();
        }
        return 0;
    }
}
